package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;

public class ResetPasswordCallback extends SequencableRPCCall<String> {

	private String email;
	private String errorMessage;

	public ResetPasswordCallback(String email_) {
		email = email_;
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.resetPassword(email, this);
	}

	@Override
	public void onSuccess(String errorMessage_) {
		errorMessage = errorMessage_;
		callNext();
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

}
